package unit4;

public class Ex4_13_Typrc {
    public static void main(String args[]) {
        int a = 69;
        System.out.println(a + "的二进制是：" + Integer.toBinaryString(
                               a)); //将十进制数转换为二进制数
        System.out.println(a + "的八进制是：" + Integer.toOctalString(
                               a)); //将十进制数转换为八进制数
        System.out.println(a + "的十六进制是：" + Integer.toHexString(
                               a)); //将十进制数转换为十六进制数
        Integer bj = Integer.valueOf("123");
        Integer bj1 = new Integer(234); // 创建整型对象
        Integer bj2 = new Integer("234");
        int i = bj.intValue(); //将对象转换为整型值
        System.out.println("bj=" + bj);
        System.out.println("i=" + i);
        System.out.println("bj1==bj2?" + bj1.equals(bj2));
    }
}
